import http from '/@/utils/request'



/**
 * 查询生产工单列表
 */
export const listWorkOrders = (query) => {
    return http.request({
        url: '/production/work/orders/list',
        method:'get',
        params:query
    })
}
/**
 * 查询生产工单详细
 */
export const getWorkOrders = (id) => {
    return http.request({
        url: '/production/work/orders/' + id,
        method:'get'
    })
}

/**
 * 新增生产工单
 */
export const addWorkOrders = (data) => {
    return http.request({
        url: '/production/work/orders',
        method: 'post',
        data
    })
}
/**
 * 领取的生产工单
 */
export const updateReceive = (request) => {
    return http.request({
        url: '/production/work/orders/update.receive?request='+request,
        method: 'get',
    })
}

/**
 * 修改生产工单
 */
export const updateWorkOrders = (data) => {
    return http.request({
        url: '/production/work/orders',
        method: 'put',
        data
    })
}

/**
 * 删除生产工单
 */
export const delWorkOrders = (data) => {
    return http.request({
        url: '/production/work/orders/delete' ,
        method: 'put',
        data
    })
}
